﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DLMemberPointMS.Entity.ViewModel;
using DLMemberPointMS.Business;
namespace DLMemberPointMS.Web.Controllers
{
    public class ConsumeOrdersController : Controller
    {
        private LConsumeOrdersService LConsumeOrdersService = new LConsumeOrdersService();
        // GET: ConsumeOrders
        public ActionResult Index()
        {
            return View();
        }

        // GET: ConsumeOrders/Details/5
        public ActionResult Details(int id)
        {
            return View();
        }

        // GET: ConsumeOrders/Create
        public ActionResult Create()
        {
            return View();
        }
        public ActionResult InsertConsumeOrder(string MC_ID, string id, string CO_GavePoint)
        {
           var resault= LConsumeOrdersService.InsertConsume(MC_ID,  id,   CO_GavePoint);

            return Json(resault,JsonRequestBehavior.AllowGet);
        }


        // GET: ConsumeOrders/Edit/5
        public ActionResult Edit(int id)
        {
            return View();
        }

        // POST: ConsumeOrders/Edit/5
        [HttpPost]
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add update logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        // GET: ConsumeOrders/Delete/5
        public ActionResult Delete(int id)
        {
            return View();
        }

        // POST: ConsumeOrders/Delete/5
        [HttpPost]
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
    }
}
